<template>
	<view>
		<u--form v-if="tab=='red'" labelPosition="left" labelWidth="180" :model="redinfo" :rules="redrules"
			ref="redform">
			<div class="section">
				<u-form-item label="申报人:" prop="userName" borderBottom>
					<u--input disabled placeholder="请输入" v-model="redinfo.userName" border="none"></u--input>
				</u-form-item>
				<u-form-item label="村(社区):" prop="village" borderBottom>
					<u--input disabled placeholder="请选择村(社区)" v-model="redinfo.village" border="none"></u--input>
				</u-form-item>
				<u-form-item label="详细地址:" prop="address" borderBottom>
					<u--input disabled placeholder="请输入" v-model="redinfo.address" border="none"></u--input>
				</u-form-item>
			</div>
			<div class="section">
				<div class="title">男方</div>
				<u-form-item label="姓名:" prop="manName" borderBottom>
					<u--input disabled placeholder="请输入" v-model="redinfo.manName" border="none"></u--input>
				</u-form-item>
				<u-form-item label="联系方式:" prop="manPhone" borderBottom>
					<u--input disabled placeholder="请输入" v-model="redinfo.manPhone" border="none"></u--input>
				</u-form-item>
				<u-form-item label="政治面貌:" prop="manPoliticalOutlook" borderBottom>
					<u--input disabled placeholder="请选择政治面貌" v-model="redinfo.manPoliticalOutlook" border="none">
					</u--input>
				</u-form-item>
				<u-form-item label="工作单位:" prop="manWork" borderBottom>
					<u--input disabled placeholder="请输入" v-model="redinfo.manWork" border="none"></u--input>
				</u-form-item>
			</div>
			<div class="section">
				<div class="title">女方</div>
				<u-form-item label="姓名:" prop="womanName" borderBottom>
					<u--input disabled placeholder="请输入" v-model="redinfo.womanName" border="none"></u--input>
				</u-form-item>
				<u-form-item label="联系方式:" prop="womanPhone" borderBottom>
					<u--input disabled placeholder="请输入" v-model="redinfo.womanPhone" border="none"></u--input>
				</u-form-item>
				<u-form-item label="政治面貌:" prop="womanPoliticalOutlook" borderBottom>
					<u--input disabled placeholder="请选择政治面貌" v-model="redinfo.womanPoliticalOutlook" border="none">
					</u--input>
				</u-form-item>
				<u-form-item label="工作单位:" prop="womanWork" borderBottom>
					<u--input disabled placeholder="请输入" v-model="redinfo.womanWork" border="none"></u--input>
				</u-form-item>
			</div>
			<div class="section">
				<u-form-item label="办理时间:" prop="affairTime" borderBottom>
					<u--input disabled placeholder="请选择起止时间" v-model="redinfo.affairTime" border="none"></u--input>
				</u-form-item>
				<u-form-item label="场地名称:" prop="affairPlaceName" borderBottom>
					<u--input disabled placeholder="请输入" v-model="redinfo.affairPlaceName" border="none"></u--input>
				</u-form-item>
				<u-form-item label="办理地点:" prop="affairPlace" borderBottom>
					<u--input disabled placeholder="请输入" v-model="redinfo.affairPlace" border="none"></u--input>
				</u-form-item>
				<u-form-item label="拟宴请人数:" prop="peopleNum" borderBottom>
					<u--input disabled type='number' placeholder="请输入" v-model="redinfo.peopleNum" border="none">
					</u--input>
				</u-form-item>
				<u-form-item label="拟用车辆数:" prop="car" borderBottom>
					<u--input disabled type='number' placeholder="请输入" v-model="redinfo.car" border="none">
					</u--input>
				</u-form-item>
				<u-form-item label="车辆来源:" prop="carSource" borderBottom>
					<u--input disabled placeholder="请输入" v-model="redinfo.carSource" border="none"></u--input>
				</u-form-item>
				<u-form-item v-if="redinfo.remark" label="备注:" prop="remark" borderBottom>
					<u--input disabled placeholder="请输入" v-model="redinfo.remark" border="none"></u--input>
				</u-form-item>
			</div>
			<div class="section">
				<div class="title">是否包含外地返回人员</div>
				{{redinfo.outlander=='1'?'有':'无'}}
				<u-form-item v-if="redinfo.outlander=='1'" label="外来人数:" prop="outlanderNum" borderBottom>
					<u--input disabled type='number' placeholder="请输入" v-model="redinfo.outlanderNum" border="none">
					</u--input>
				</u-form-item>
			</div>
			<div class="section">
				<div class="title">是否来自14天内有新增阳性感染者或中高风险地区 所在县（市、区，直辖市街道）</div>
				{{redinfo.highRisk=='1'?'有':'无'}}
				<u-form-item v-if="redinfo.highRisk=='1'" label="高风险地区:" prop="highRiskPlace" borderBottom>
					<u--input disabled placeholder="请输入" v-model="redinfo.highRiskPlace" border="none"></u--input>
				</u-form-item>
			</div>
			<div class="section">
				<div class="title">是否邀请健康码为红、黄码或有发热、干咳、咽痛、 乏力、腹泻等身体异常症状者参加</div>
				{{redinfo.abnormalMan=='1'?'有':'无'}}
				<u-form-item v-if="redinfo.abnormalMan=='1'" label="异常症状者:" prop="abnormalManName" borderBottom>
					<u--input disabled placeholder="请输入" v-model="redinfo.abnormalManName" border="none"></u--input>
				</u-form-item>
			</div>
		</u--form>
		<u--form v-if="tab=='white'" labelPosition="left" labelWidth="180" :model="whiteinfo" :rules="whiterules"
			ref="whiteform">
			<div class="section">
				<u-form-item label="村(社区):" prop="village" borderBottom>
					<u--input disabled placeholder="请选择村(社区)" v-model="whiteinfo.village" border="none"></u--input>
				</u-form-item>
				<u-form-item label="详细地址:" prop="address" borderBottom>
					<u--input disabled placeholder="请输入" v-model="whiteinfo.address" border="none"></u--input>
				</u-form-item>
			</div>
			<div class="section">
				<div class="title">申报人</div>
				<u-form-item label="姓名:" prop="manName" borderBottom>
					<u--input disabled placeholder="请输入" v-model="whiteinfo.manName" border="none"></u--input>
				</u-form-item>
				<u-form-item label="联系方式:" prop="manPhone" borderBottom>
					<u--input disabled placeholder="请输入" v-model="whiteinfo.manPhone" border="none"></u--input>
				</u-form-item>
				<u-form-item label="性别:" prop="manSex" borderBottom>
					<u--input disabled placeholder="请选择性别" v-model="whiteinfo.manSex" border="none">
					</u--input>
				</u-form-item>
				<u-form-item label="政治面貌:" prop="manPoliticalOutlook" borderBottom>
					<u--input disabled placeholder="请选择政治面貌" v-model="whiteinfo.manPoliticalOutlook" border="none">
					</u--input>
				</u-form-item>
				<u-form-item label="工作单位:" prop="manWork" borderBottom>
					<u--input disabled placeholder="请输入" v-model="whiteinfo.manWork" border="none"></u--input>
				</u-form-item>
				<u-form-item label="与逝者关系:" prop="deceasedRelation" borderBottom>
					<u--input disabled placeholder="请选择关系" v-model="whiteinfo.deceasedRelation" border="none">
					</u--input>
				</u-form-item>
			</div>
			<div class="section">
				<div class="title">逝者</div>
				<u-form-item label="姓名:" prop="deceasedName" borderBottom>
					<u--input disabled placeholder="请输入" v-model="whiteinfo.deceasedName" border="none"></u--input>
				</u-form-item>
				<u-form-item label="性别:" prop="deceasedSex" borderBottom>
					<u--input disabled placeholder="请选择性别" v-model="whiteinfo.deceasedSex" border="none">
					</u--input>
				</u-form-item>
				<u-form-item label="年龄:" prop="deceasedAge" borderBottom>
					<u--input disabled placeholder="请输入" type="number" v-model="whiteinfo.deceasedAge" border="none">
					</u--input>
				</u-form-item>
			</div>
			<div class="section">
				<u-form-item label="办理时间:" prop="affairTime" borderBottom>
					<u--input disabled placeholder="请选择起止时间" v-model="whiteinfo.affairTime" border="none">
					</u--input>
				</u-form-item>
				<u-form-item label="场地名称:" prop="affairPlaceName" borderBottom>
					<u--input disabled placeholder="请输入" v-model="whiteinfo.affairPlaceName" border="none"></u--input>
				</u-form-item>
				<u-form-item label="办理地点:" prop="affairPlace" borderBottom>
					<u--input disabled placeholder="请输入" v-model="whiteinfo.affairPlace" border="none"></u--input>
				</u-form-item>
				<u-form-item label="拟宴请人数:" prop="peopleNum" borderBottom>
					<u--input disabled type='number' placeholder="请输入" v-model="whiteinfo.peopleNum" border="none">
					</u--input>
				</u-form-item>				
				<u-form-item label="拟用殡仪车辆来源:" prop="carSource" borderBottom>
					<u--input disabled placeholder="请输入" v-model="whiteinfo.carSource" border="none"></u--input>
				</u-form-item>
				<u-form-item v-if="whiteinfo.carSource=='私人'" label="车牌号:" prop="car" borderBottom>
					<u--input placeholder="请输车牌号" v-model="whiteinfo.car" border="none"></u--input>
				</u-form-item>
				<u-form-item v-if="redinfo.remark" label="备注:" prop="remark" borderBottom>
					<u--input disabled placeholder="请输入" v-model="whiteinfo.remark" border="none"></u--input>
				</u-form-item>
			</div>
			<div class="section">
				<div class="title">是否包含外地返回人员</div>
				{{whiteinfo.outlander=='1'?'有':'无'}}
				<u-form-item v-if="whiteinfo.outlander=='1'" label="外来人数:" prop="outlanderNum" borderBottom>
					<u--input disabled type='number' placeholder="请输入" v-model="whiteinfo.outlanderNum" border="none">
					</u--input>
				</u-form-item>
			</div>
			<div class="section">
				<div class="title">是否来自14天内有新增阳性感染者或中高风险地区 所在县（市、区，直辖市街道）</div>
				{{whiteinfo.highRisk=='1'?'有':'无'}}
				<u-form-item v-if="whiteinfo.highRisk=='1'" label="高风险地区:" prop="highRiskPlace" borderBottom>
					<u--input disabled placeholder="请输入" v-model="whiteinfo.highRiskPlace" border="none"></u--input>
				</u-form-item>
			</div>
			<div class="section">
				<div class="title">是否邀请健康码为红、黄码或有发热、干咳、咽痛、 乏力、腹泻等身体异常症状者参加</div>
				<div>{{whiteinfo.abnormalMan=='1'?'有':'无'}}</div>
				<u-form-item v-if="whiteinfo.abnormalMan=='1'" label="异常症状者:" prop="abnormalManName" borderBottom>
					<u--input disabled placeholder="请输入" v-model="whiteinfo.abnormalManName" border="none"></u--input>
				</u-form-item>
			</div>
		</u--form>
	</view>
</template>
<script>
	import {
		AddRedaffair,
		AddWhiteaffair
	} from "@/utils/api.js"
	export default {
		data() {
			return {
				tab: '',
				redinfo: {
					userName: '',
					village: '',
					manName: '',
					manPhone: '',
					manPoliticalOutlook: '群众',
					manWork: '',
					womanName: '',
					womanPhone: '',
					womanPoliticalOutlook: '群众',
					womanWork: '',
					affairTime: '',
					affairPlaceName: '',
					affairPlace: '',
					peopleNum: '',
					car: '',
					carSource: '',
					remark: '',
					outlander: '0',
					outlanderNum: '',
					highRisk: '0',
					highRiskPlace: '',
					abnormalMan: '0',
					abnormalManName: '',
				},
				whiteinfo: {
					village: '',
					manName: '',
					manPhone: '',
					manSex: '男',
					manPoliticalOutlook: '群众',
					manWork: '',
					deceasedRelation: '父子',
					deceasedName: '',
					deceasedSex: '男',
					deceasedAge: '',
					affairTime: '',
					affairPlace: '',
					affairPlaceName: '',
					peopleNum: '',
					car: '',
					carSource: '',
					remark: '',
					outlander: '0',
					outlanderNum: '',
					highRisk: '0',
					highRiskPlace: '',
					abnormalMan: '0',
					abnormalManName: '',
				},
			};
		},
		onLoad() {
			let type = uni.getStorageSync('type')
			let info = uni.getStorageSync('info')
			if (type === 'red') {
				this.tab = 'red'
				this.redinfo = info
			}
			if (type === 'white') {
				this.tab = 'white'
				this.whiteinfo = info
			}
		},
		methods: {},
	};
</script>
<style lang="scss">
	page {
		height: 100%;
		background-color: #f4f4f4;
	}

	/deep/ .u-input {
		background-color: transparent !important;
	}

	.tab-list {
		padding: 24upx 0;
		display: flex;
		justify-content: space-around;

		.tab-item {
			height: 60rpx;
			line-height: 60rpx;
			border-bottom: 6rpx solid #f4f4f4;

			&.active {
				color: #2952FC;
				border-bottom: 6rpx solid #2952FC;
			}
		}
	}

	.section {
		background-color: #ffffff;
		margin-bottom: 24rpx;
		padding: 24rpx;

		.title {
			padding: 24upx 0;
			font-size: 30rpx;
			font-weight: bold;
			border-bottom: 2rpx solid rgb(214, 215, 217);
		}
	}

	.submit-wrapper {
		margin: 0 auto;
		width: 700rpx;
		background-color: #006DF4;
		color: #ffffff;
	}

	.radio-group {
		padding: 24upx;

		.item {
			margin: 12upx 0;
			display: flex;
			align-items: center;

			.circle {
				width: 24rpx;
				height: 24rpx;
				line-height: 24rpx;
				text-align: center;
				border-radius: 24rpx;
				border: 2rpx solid #aaaaaa;
				margin-right: 16rpx;
				font-size: 28rpx;
				color: #ffffff;

				&.active {
					background-color: #006DF4;
					border-color: #006DF4;
				}
			}
		}
	}
</style>
